home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.9 / svgatext / SVGATextCalc.pod < prev    next >
Encoding:
Text File  |  1996-06-14  |  6.9 KB  |  196 lines

  1. =head1 NAME
  2.  
  3. SVGATextCalc - SVGATextMode mode calculator
  4.  
  5. =head1 SYNOPSIS
  6.  
  7. B<SVGATextCalc>
  8. B<MODE>
  9. [B<--font=fontsize>]
  10. [B<--trick9>]
  11. [B<--verbose>]
  12. [B<--vsf=vertical scanning frequency>]
  13. [B<--dot=Dot clockfrequency (Mhz)>]
  14. [B<--hmargin=horizontal margin factor>]
  15. [B<--vmargin=vertical margin factor>]
  16.  
  17. =head1 DESCRIPTION
  18.  
  19. SVGATextCalc takes command line arguments and generates "Modelines" suitable for
  20. SVGATextMode. User supplied arguments are in high-level, understandable formats,
  21. like screen width, height, font size, etc. The program will take this 
  22. data and spit out the paraphernalia necessary to (hopefully) program the
  23. VGA registers (this is a task for F<SVGATextMode(1)>).
  24.  
  25. SVGATextCalc will do its best to make a video mode matching or as close as
  26. possible to the video mode requested by the user. Hardware constraints
  27. (for now, HorizSync and DacSpeed only) will be read from the
  28. SVGATextMode configuration file F</etc/TextConfig>.
  29.  
  30. SVGATextCalc will do a purely numerical calculation of the horizontal and
  31. vertical VGA parameters and frequencies first. Based on these results,
  32. obvious checks are made (horizontal frequency, dot clock, etc) to see if
  33. they fall within a range compatible with your hardware.  SVGATextCalc will
  34. try really hard to make the best video mode as possible and has some
  35. limited intelligence built in (for instance, it will manipulate the dot
  36. clock frequency if the resulting horizontal frequency falls beyond your
  37. monitor's capability).
  38.  
  39. Advanced users can control some subtle aspects of the calculations, such
  40. as the Dot clock frequency, vertical scanning frequency and some other
  41. interesting parameters.
  42.  
  43. =head1 OPTIONS
  44.  
  45. =over 8
  46.  
  47. =item B<MODE>
  48.  
  49. The desired mode. The format is CxR, where C is the number of desired columns and
  50. R is the number of rows.
  51.  
  52. =item B<--font=fontsize>
  53.  
  54. Set the font size to be used. VGA hardware fonts are in the form WxH, where W
  55. is Width and H is Height (both in pixels). The default font is 8x16 (used in
  56. the 80x25 mode). Some other common fonts are 8x14, 8x8, etc. See the command
  57. line option B<--trick9> for a discussion about 9 pixel fonts.
  58.  
  59. =item B<--trick9>
  60.  
  61. The VGA hardware has a "trick" that allows 9 pixel wide fonts. In fact, they 
  62. are the very same 8 point fonts with a space added. This mode has the 
  63. advantage of not being so "cluttered" on the screen. If you want this mode,
  64. specify your normal 8 width fonts and add the B<--trick9> command line 
  65. option. You must choose an 8 pixel font as you would normally, or
  66. this option will be silently ignored. 
  67.  
  68. =item B<--verbose>
  69.  
  70. Displays some info to stderr. Nothing else. :)
  71.  
  72. =item B<--vsf=Vertical scanning frequency (in Hz)>
  73.  
  74. Set the VSF, also known as vertical refresh rate. The more your monitor can
  75. handle, the better for your eyes. Reduced rates tend to produce flicker. 
  76. The default is 60Hz.
  77.  
  78. =item B<--dot=Dotclock frequency (in MHz)>
  79.  
  80. Use this to force the program to calculate everything based on the given
  81. Dotclock frequency. Usually, it will be derived from other parameters and
  82. readjusted if the horizontal scanning frequency falls off limits. If you
  83. set the frequency with this option, SVGATextCalc will not attempt to change
  84. it (but you have greater chances of ending with parameters outside the
  85. limits your monitor can handle).
  86.  
  87. =item B<--hmargin> and B<--vmargin>
  88.  
  89. These options control internal aspects of the program. If you have the guts
  90. to change them, I suppose you have the guts to take a look at the source
  91. code and discover what you're doing. :)
  92.  
  93. =head1 ERRORS
  94.  
  95. The program will make some basic checks against the generated data. Basically,
  96. it will try to avoid overloading your hardware but, of course, computers do
  97. what you tell them to do, not what you want them to do.
  98.  
  99. =head1 EXAMPLES
  100.  
  101. =item F<SVGATextCalc 90x30>
  102.  
  103. I love this one. Fits nicely on my 14" monitor. :)
  104.  
  105. =item F<SVGATextCalc 90x30 --trick9>
  106.  
  107. Same as above, but (IMO) much better. Fonts don't "stick" together so much.
  108.  
  109. =item F<SVGATextCalc 100x37 --font 8x14 --vsf=66>
  110.  
  111. 100 by 37 characters, using an 8x14 font at 66Hz vertical frequency scan.
  112. If you are out of luck (like me) and have a cheap 14" monitor, you'll notice
  113. that the resulting VSF is at 63Hz, not 66Hz as requested. In my case, the 
  114. monitor can't handle anything above 35.5Khz (Horizontal scan), so the
  115. program dropped the dotclock frequency a little, trying to keep the
  116. resolution. The result was degraded vertical refresh.
  117.  
  118. =item F<SVGATextCalc 100x37 --font 8x14 --vsf=66 --dot=38>
  119.  
  120. Same as above, but forcing the dot clock to 38 MHz. Notice it now sticks to
  121. 66 Hz refresh rates with a 36.76KHz horizontal scan rate. That's why it dropped to
  122. 63Hz in the previous example (in my case).
  123.  
  124. =head1 SEE ALSO
  125.  
  126. F<SVGATextMode(1)>
  127.  
  128. =head1 WARNINGS
  129.  
  130. Messing with the VGA registers may damage your hardware. The author (Marco
  131. Paganini, paganini@ism.com.br) takes B<NO RESPONSIBILITY> for anything
  132. caused by the use of this program. Every effort has been made to prevent
  133. very stupid mistakes, but always remember that computers are stupid things
  134. and there are many ways to fool a program.
  135.  
  136. Little story:
  137.  
  138. Some years ago I was sitting on my office desk, bored as always... All
  139. of a sudden, I remembered a very old monitor we had in spare. The tube
  140. was tainted, the case broken and the circuitry occasionally failed. The
  141. repair would cost more than the monitor itself... I thought then: "Hey,
  142. let's see if this thing can really be burned via software". I grabbed a
  143. small DOS program that allows you to change the VGA registers and set
  144. the frequencies to absurd values. All you could see was a vertical line
  145. in the middle of the screen and a very high pitched noise coming from
  146. the monitor. The noise was loud, but since the intent was to try to burn
  147. the monitor, the louder, the better.
  148.  
  149. I left it at this state for over 24 hours. Nothing happened. I fiddled 
  150. even more with the registers, producing even more obscure results.
  151. Nothing happened.
  152.  
  153. From that day on, I decided that it's not so easy to burn a monitor
  154. via software. But caution is recommended. The monitor in question was a
  155. Low-end Samsung SyncMaster 3, 35.5Khz/90Hz. I believe that the bigger
  156. monitors may be more sensible to this kind of attack, so watch 
  157. carefully what you do.
  158.  
  159. =back
  160.  
  161. =head1 BUGS
  162.  
  163. =over 4
  164.  
  165. =item *
  166.  
  167. Not exactly a bug, but there's 90% of a chance that you will have to
  168. use F<vgaset(1)> to tune your video mode. This happens whenever you
  169. generate a new video mode, since it's almost impossible to predict
  170. your monitor timings exactly.
  171.  
  172. =item *
  173.  
  174. No check is made for the vertical frequency
  175.  
  176. =item *
  177.  
  178. Currently, no individual horizontal frequencies are allowed. It means that
  179. if you use HorizSync A,B,C,D-E,F,G it will only consider the A and F
  180. frequencies as the lower and upper bounds, respectively.
  181.  
  182. =item *
  183.  
  184. No space is allowed between the values in the HorizSync line. 
  185.  
  186. =head1 AUTHOR
  187.  
  188. B<Marco Paganini>
  189. B<paganini@ism.com.br>
  190. B<http://www.ism.com.br/~paganini>
  191.  
  192. If you use this program and find it of any use, please send me your
  193. comments and/or suggestions.
  194.  
  195. =back
  196.